﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TBM.Core
{
    public class Lang
    {
        // 1 - 9 用户登陆相关信息
        /// <summary>
        /// 登陆成功
        /// </summary>
        public static LangItem LOGIN_SUCCESS { get { return new LangItem { Code = 1, Message = "登陆成功" }; } }
        /// <summary>
        /// 登陆失败
        /// </summary>
        public static LangItem LOGIN_FAILED { get { return new LangItem { Code = 2, Message = "登陆失败" }; } }
        /// <summary>
        /// 账号或密码错误
        /// </summary>
        public static LangItem ID_PWD_ERROR { get { return new LangItem { Code = 3, Message = "账号或密码错误" }; } }
        /// <summary>
        /// 账号被锁定
        /// </summary>
        public static LangItem ID_LOCKED { get { return new LangItem { Code = 4, Message = "账号被锁定，请联系管理员" }; } }
        // 10 - 20 服务器相关信息
        /// <summary>
        /// 远程服务未能正确响应
        /// </summary>
        public static LangItem SERVICE_ERR_RESPONSE { get { return new LangItem { Code = 10, Message = "远程服务未能正确响应" }; } }
        // 21 - 30 表单相关信息
        /// <summary>
        /// 表单不完整
        /// </summary>
        public static LangItem FORM_INCOMPLETE { get { return new LangItem { Code = 21, Message = "表单不完整，部分必填项未填写相关信息" }; } }
        // 31 - 50 请求相关信息
        /// <summary>
        /// 请求信息不完整
        /// </summary>
        public static LangItem REQUEST_INFO_INCOMPLETE { get { return new LangItem { Code = 31, Message = "请求信息不完整" }; } }
        /// <summary>
        /// 请求完成
        /// </summary>
        public static LangItem REQUEST_DONE { get { return new LangItem { Code = 32, Message = "请求完成" }; } }
        /// <summary>
        /// 当前用户密码验证失败
        /// </summary>
        public static LangItem REQUEST_CHECK_PWD_FAILED { get { return new LangItem { Code = 33, Message = "密码验证失败" }; } }
        // 100 - 999 执行结果相关信息
        /// <summary>
        /// 命令执行成功
        /// </summary>
        public static LangItem CMD_SUCCESS { get { return new LangItem { Code = 100, Message = "命令执行成功" }; } }
        /// <summary>
        /// 命令执行失败
        /// </summary>
        public static LangItem CMD_FAILED { get { return new LangItem { Code = 101, Message = "命令执行失败" }; } }
        /// <summary>
        /// 命令执行异常
        /// </summary>
        public static LangItem CMD_EXCEPTION { get { return new LangItem { Code = 102, Message = "命令执行异常" }; } }
        /// <summary>
        /// UID已被注册
        /// </summary>
        public static LangItem CMD_UID_EXISTS { get { return new LangItem { Code = 103, Message = "UID已被注册" }; } }
        /// <summary>
        /// Email地址已被注册
        /// </summary>
        public static LangItem CMD_EMAIL_EXISTS { get { return new LangItem { Code = 104, Message = "Email地址已被注册" }; } }
        /// <summary>
        /// UID和Email地址已被注册
        /// </summary>
        public static LangItem CMD_UID_EMAIL_EXISTS { get { return new LangItem { Code = 105, Message = "UID和Email地址已被注册" }; } }
        /// <summary>
        /// 已成功创建用户
        /// </summary>
        public static LangItem CMD_CREATE_USER_SUCCESS { get { return new LangItem { Code = 106, Message = "已成功创建用户" }; } }
        /// <summary>
        /// 创建用户失败
        /// </summary>
        public static LangItem CMD_CREATE_USER_FAILED { get { return new LangItem { Code = 107, Message = "创建用户失败" }; } }
        /// <summary>
        /// 发送邮件没有提供接受地址
        /// </summary>
        public static LangItem SEND_MAIL_NO_ADDRESS { get { return new LangItem { Code = 108, Message = "发送邮件没有提供接受地址" }; } }
        /// <summary>
        /// 发送邮件失败
        /// </summary>
        public static LangItem SEND_MAIL_FAILED { get { return new LangItem { Code = 109, Message = "发送邮件失败" }; } }
        /// <summary>
        /// 发送邮件成功
        /// </summary>
        public static LangItem SEND_MAIL_SUCCESS { get { return new LangItem { Code = 110, Message = "发送邮件成功" }; } }
        /// <summary>
        /// 删除账户成功
        /// </summary>
        public static LangItem DELETE_USER_SUCCESS { get { return new LangItem { Code = 111, Message = "删除账户成功" }; } }
        /// <summary>
        /// 完成用户添加到组动作
        /// </summary>
        public static LangItem APPEND_TO_GROUPS_SUCCESS { get { return new LangItem { Code = 112, Message = "用户已成功添加到组" }; } }
        /// <summary>
        /// 未完成用户添加到组动作
        /// </summary>
        public static LangItem APPEND_TO_GROUPS_FAILED { get { return new LangItem { Code = 113, Message = "任务未能完成，可能用户已被添加到组或是添加失败" }; } }
        /// <summary>
        /// 保存头像成功
        /// </summary>
        public static LangItem UPDATE_AVATAR_SUCCESS { get { return new LangItem { Code = 114, Message = "保存头像成功" }; } }
        /// <summary>
        /// 保存头像失败
        /// </summary>
        public static LangItem UPDATE_AVATAR_FAILED { get { return new LangItem { Code = 115, Message = "保存头像失败" }; } }
        /// <summary>
        /// 原始密码不正确
        /// </summary>
        public static LangItem PREVIOUS_PASSWORD_ERROR { get { return new LangItem { Code = 116, Message = "原始密码不正确" }; } }
        /// <summary>
        /// 权限更新失败
        /// </summary>
        public static LangItem PERMISSION_UPDATE_FAILED { get { return new LangItem { Code = 117, Message = "权限更新失败" }; } }
        /// <summary>
        /// GID已经被注册过了
        /// </summary>
        public static LangItem EXISTS_GID { get { return new LangItem { Code = 118, Message = "GID已经被注册过了" }; } }
        /// <summary>
        /// 删除分组失败
        /// </summary>
        public static LangItem DELETE_GROUP_FAILED { get { return new LangItem { Code = 119, Message = "删除分组失败" }; } }
        /// <summary>
        /// 获取联系人失败
        /// </summary>
        public static LangItem GET_CONTACTS_FAILED { get { return new LangItem { Code = 120, Message = "获取联系人失败" }; } }
        /// <summary>
        /// 邮件已成功保存
        /// </summary>
        public static LangItem SAVE_MAIL_TO_DRAFT_SUCCESS { get { return new LangItem { Code = 121, Message = "邮件已成功保存" }; } }
        /// <summary>
        /// 没有发件人地址
        /// </summary>
        public static LangItem EMAIL_NO_FROM_ADDRESS { get { return new LangItem { Code = 122, Message = "没有发件人地址" }; } }
        /// <summary>
        /// 没有收件人地址
        /// </summary>
        public static LangItem EMAIL_NO_TO_ADDRESS { get { return new LangItem { Code = 123, Message = "没有收件人地址" }; } }
        /// <summary>
        /// 邮件已被临时删除
        /// </summary>
        public static LangItem EMAIL_MOVE_TO_TRASH { get { return new LangItem { Code = 124, Message = "邮件已被删除，您可以从垃圾箱中恢复它" }; } }
        /// <summary>
        /// 邮件不能发给自己
        /// </summary>
        public static LangItem EMAIL_SEND_CANNOT_TO_SELF { get { return new LangItem { Code = 125, Message = "邮件不能发给自己" }; } }
        /// <summary>
        /// 事件标题不能为空
        /// </summary>
        public static LangItem EVENT_CANNOT_EMPTY { get { return new LangItem { Code = 126, Message = "事件标题不能为空" }; } }
        /// <summary>
        /// 事件开始时间不能大于结束时间
        /// </summary>
        public static LangItem EVENT_ENDTIME_ERROR { get { return new LangItem { Code = 127, Message = "事件开始时间不能大于结束时间" }; } }
        /// <summary>
        /// 颜色格式不正确
        /// </summary>
        public static LangItem COLOR_FORMAT_ERROR { get { return new LangItem { Code = 128, Message = "颜色格式不正确" }; } }
        /// <summary>
        /// 事件重复类型与持续时间冲突
        /// </summary>
        public static LangItem EVENT_DURATION_ERROR { get { return new LangItem { Code = 129, Message = "事件重复类型与持续时间冲突" }; } }
        /// <summary>
        /// 事件添加成功
        /// </summary>
        public static LangItem EVENT_ADD_SUCCESS { get { return new LangItem { Code = 130, Message = "事件添加成功" }; } }
        /// <summary>
        /// 事件添加失败
        /// </summary>
        public static LangItem EVENT_ADD_FAILED { get { return new LangItem { Code = 131, Message = "事件添加失败" }; } }
    }

    public class LangItem
    {
        /// <summary>
        /// 代码
        /// </summary>
        public int Code;
        /// <summary>
        /// 消息
        /// </summary>
        public string Message;
    }
}